import request from '@/utils/request.js'
console.log(request)

/**
 * 根据关键字获取搜索建议
 * @param {*} q 搜索关键字
 * @returns promise
 */
export const getSearchSuggestAPI = q => {
  return request({
    url: '/v1_0/suggestion',
    params: {
      q
    }
  })
}

/**
 * 获取搜索结果
 * @param {*} params  关键字
 * @returns promise
 */
export const getSearchResultsAPI = params => {
  return request({
    url: '/v1_0/search',
    params
  })
}
